#test data

MongoHelper = require("./../service/MongoHelper")
_w = require("when")

dbQ = MongoHelper.openDb()

taskCollection = null;
dbQ.then (db)->
	taskCollection = db.collection("task")

json =
	id: 111,
	name: "问题1",
	type: "BUG",
	level: "正常",
	status: "新建",
	desc: "问题描述问题描述",
	details: "- - -",
	comment: "- - -",
	createTime: new Date(),
	modifyTime: new Date(),
	version: "1.0",
	publishTime: new Date()

# TODO:获取全部task
exports.getTasks = ->
	return [json, json]

exports.getTask = ->
	taskCollection.find({id: 1})
